/**
 * jims
 */
package com.jims.master.modules.blood.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 血液出库明细记录Entity
 * @author fengyg
 * @version 2017-04-10
 */
public class BloodOutpDetail extends DataEntity<BloodOutpDetail> {
	
	private static final long serialVersionUID = 1L;
	private String outpMasterId;		// outp_master_id
	private String bloodId;		// 血袋号
	private String patBloodGroup;		// 血型
	private String rh;		// RH
	private String componentId;		// 血液成份代码
	private String bloodCapacity;		// 储血量
	private Date invalDate;		// 有效日期
	private String bloodDonorName;		// 献血者
	private Date bloodGatherDate;		// 采血日期
	private String units;		// 单位

    private String patBloodGroupCode;   //血型代码
    private String rhCode;    //rh代码
    private String bloodComponentName;  //血液成分名称
    private String unitsName;    //单位名称
    private BloodOutpMaster bloodOutpMaster;  //出库主表
    private BloodInpMaster bloodInpMaster;  //入库主表
    private BloodInpDetail bloodInpDetail;  //入库明明细表
    private String outpNo;
    private Date startDate;
    private Date stopDate;

    List<BloodOutpDetail> bloodExportDetailList;
	
	public BloodOutpDetail() {
		super();
	}

	public BloodOutpDetail(String id){
		super(id);
	}

	@Length(min=0, max=64, message="outp_master_id长度必须介于 0 和 64 之间")
	public String getOutpMasterId() {
		return outpMasterId;
	}

	public void setOutpMasterId(String outpMasterId) {
		this.outpMasterId = outpMasterId;
	}
	
	@Length(min=1, max=100, message="血袋号长度必须介于 1 和 100 之间")
	public String getBloodId() {
		return bloodId;
	}

	public void setBloodId(String bloodId) {
		this.bloodId = bloodId;
	}
	
	@Length(min=1, max=2, message="血型长度必须介于 1 和 2 之间")
	public String getPatBloodGroup() {
		return patBloodGroup;
	}

	public void setPatBloodGroup(String patBloodGroup) {
		this.patBloodGroup = patBloodGroup;
	}
	
	@Length(min=1, max=2, message="RH长度必须介于 1 和 2 之间")
	public String getRh() {
		return rh;
	}

	public void setRh(String rh) {
		this.rh = rh;
	}
	
	@Length(min=1, max=64, message="血液成份代码长度必须介于 1 和 64 之间")
	public String getComponentId() {
		return componentId;
	}

	public void setComponentId(String componentId) {
		this.componentId = componentId;
	}
	
	public String getBloodCapacity() {
		return bloodCapacity;
	}

	public void setBloodCapacity(String bloodCapacity) {
		this.bloodCapacity = bloodCapacity;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="有效日期不能为空")
	public Date getInvalDate() {
		return invalDate;
	}

	public void setInvalDate(Date invalDate) {
		this.invalDate = invalDate;
	}
	
	@Length(min=0, max=20, message="献血者长度必须介于 0 和 20 之间")
	public String getBloodDonorName() {
		return bloodDonorName;
	}

	public void setBloodDonorName(String bloodDonorName) {
		this.bloodDonorName = bloodDonorName;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBloodGatherDate() {
		return bloodGatherDate;
	}

	public void setBloodGatherDate(Date bloodGatherDate) {
		this.bloodGatherDate = bloodGatherDate;
	}
	
	@Length(min=0, max=10, message="单位长度必须介于 0 和 10 之间")
	public String getUnits() {
		return units;
	}

	public void setUnits(String units) {
		this.units = units;
	}

    public BloodOutpMaster getBloodOutpMaster() {
        return bloodOutpMaster;
    }

    public void setBloodOutpMaster(BloodOutpMaster bloodOutpMaster) {
        this.bloodOutpMaster = bloodOutpMaster;
    }

    public List<BloodOutpDetail> getBloodExportDetailList() {
        return bloodExportDetailList;
    }

    public void setBloodExportDetailList(List<BloodOutpDetail> bloodExportDetailList) {
        this.bloodExportDetailList = bloodExportDetailList;
    }

    public BloodInpMaster getBloodInpMaster() {
        return bloodInpMaster;
    }

    public void setBloodInpMaster(BloodInpMaster bloodInpMaster) {
        this.bloodInpMaster = bloodInpMaster;
    }

    public BloodInpDetail getBloodInpDetail() {
        return bloodInpDetail;
    }

    public void setBloodInpDetail(BloodInpDetail bloodInpDetail) {
        this.bloodInpDetail = bloodInpDetail;
    }

    public String getPatBloodGroupCode() {
        return patBloodGroupCode;
    }

    public void setPatBloodGroupCode(String patBloodGroupCode) {
        this.patBloodGroupCode = patBloodGroupCode;
    }

    public String getRhCode() {
        return rhCode;
    }

    public void setRhCode(String rhCode) {
        this.rhCode = rhCode;
    }

    public String getBloodComponentName() {
        return bloodComponentName;
    }

    public void setBloodComponentName(String bloodComponentName) {
        this.bloodComponentName = bloodComponentName;
    }

    public String getUnitsName() {
        return unitsName;
    }

    public void setUnitsName(String unitsName) {
        this.unitsName = unitsName;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getStopDate() {
        return stopDate;
    }

    public void setStopDate(Date stopDate) {
        this.stopDate = stopDate;
    }

    public String getOutpNo() {
        return outpNo;
    }

    public void setOutpNo(String outpNo) {
        this.outpNo = outpNo;
    }
}